Skip to content

fix: add download attribute to fix JAR files saving as ZIP in Chromium#6065

Merged
Prospector merged 3 commits into
modrinth:mainfrom
chank-op:main
May 15, 2026
Merged

fix: add download attribute to fix JAR files saving as ZIP in Chromium#6065
Prospector merged 3 commits into
modrinth:mainfrom
chank-op:main

Conversation

@chank-op
Copy link
Copy Markdown
Contributor

@chank-op chank-op commented May 10, 2026

  • JAR files were downloading with a .zip extension in Chromium-based browsers (Chrome, Edge, Arc, Brave, Opera, Vivaldi)
  • Root cause: JAR files are ZIP archives internally, so Chromium sniffs the Content-Type as application/zip and overrides the filename extension when no download attribute is present
  • Fix: add download="<filename>" to all file download <a> tags so the browser uses the original filename from the API

Closes #6063

- JAR files were downloading with a `.zip` extension in Chromium-based browsers (Chrome, Edge, Arc, Brave, Opera, Vivaldi)
- Root cause: JAR files are ZIP archives internally, so Chromium sniffs the `Content-Type` as `application/zip` and overrides the filename extension when no `download` attribute is present
- Fix: add `download="<filename>"` to all file download `<a>` tags so the browser uses the original filename from the API
@modrinth-bot
Copy link
Copy Markdown
Member

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@Prospector
Copy link
Copy Markdown
Member

looks to have missed a few places, such as the download modal on project pages and the changelog page. versions page changes should also be copied over to /settings/versions

Missed in initial pass: changelog page button, versions overflow
menu, settings/versions overflow menu. Also adds `download` prop
to Button and OverflowMenu to support dropdown link items.

Adds missing `getPrimaryFile` definition in changelog.vue.
@chank-op
Copy link
Copy Markdown
Contributor Author

fix: add download attribute to remaining download links

@Prospector
Copy link
Copy Markdown
Member

still missing the buttons in the download modal on project pages

@chank-op
Copy link
Copy Markdown
Contributor Author

VersionSummary.vue was fixed in 67ca4f1, this is my first pr :} and i checked and i dont really understand which exact button is still missing the download attribute?

Thank you

@Prospector
Copy link
Copy Markdown
Member

oh my bad, version summary is the one. thanks!

@Prospector Prospector enabled auto-merge May 15, 2026 14:32
@Prospector Prospector added this pull request to the merge queue May 15, 2026
Merged via the queue into modrinth:main with commit 02a7774 May 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Downloading plugin: uploaded as a jar file, but downloaded as a zip. This happens for all plugins.

3 participants